package it.polimi.digitalstate.dto;

public class JoinVoteDTO implements IDataTransferObject{
	private Integer id;
	private CitizenDTO citizen;
	private JoinrequestDTO joinrequest;
	private boolean approval;
	
	public JoinVoteDTO (CitizenDTO citizen, JoinrequestDTO joinrequest){
		this.citizen = citizen;
		this.joinrequest=joinrequest;
	}
	public JoinVoteDTO (CitizenDTO citizen, JoinrequestDTO joinrequest, boolean approval){
		this.citizen = citizen;
		this.joinrequest=joinrequest;
		this.approval=approval;
	}
	public JoinVoteDTO (int id, CitizenDTO citizen, JoinrequestDTO joinrequest, boolean approval){
		this(citizen, joinrequest, approval);
		this.id=id;
	}
	public CitizenDTO getCitizen() {
		return citizen;
	}
	public void setCitizen(CitizenDTO citizen) {
		this.citizen = citizen;
	}
	public JoinrequestDTO getJoinrequest() {
		return joinrequest;
	}
	public void setJoinrequest(JoinrequestDTO joinrequest) {
		this.joinrequest = joinrequest;
	}
	public Boolean getApproval() {
		return approval;
	}
	public void setApproval(Boolean approval) {
		this.approval = approval;
	}
	
	@Override
	public int getID() {
		if(id==null){
			//TODO throw exception
		}
		return id.intValue();
	}
	
}
